#ifndef STATICLINKEDLIST_H__
#define STATICLINKEDLIST_H__

#include <stdio.h>
#include <stdlib.h>

#define MAX_SIZE 20
#define HEAD 0
#define SPARE 1

typedef char DataType;

typedef struct {
    DataType data;
    int link;       // 模拟 link 指针
} ListNode;

typedef ListNode StaticList[MAX_SIZE];

int allocNode(StaticList *list);
void freeNode(StaticList *list, int freeNodeAddr);
void initSList(StaticList *list);
void displaySList(StaticList *list);
void instertNodeAtBeginning(StaticList *list, DataType insertData);
void deleteNodeAtBeginning(StaticList *list);

#endif